package com.celesea.auth.group.v1.controller.resource;

import com.celesea.auth.group.entity.Group;
import com.celesea.framework.util.DateUtil;

/**
 * @author JackYuan
 * @create 2017-10-26 23:45
 */
public class GroupResource {
    private String id;
    private String code;
    private String name;
    private String creatorName;
    private String serverCreateTime;
    private String description;
    private Integer sort;
    private Byte statusFlag;

    public GroupResource(Group group) {
        this.id = group.getId();
        this.code = group.getCode();
        this.name = group.getName();
        this.sort = group.getSort();
        this.description = group.getDescription();
        this.statusFlag = group.getStatusFlag();
        this.creatorName = group.getCreatorName();
        this.serverCreateTime = DateUtil.getDay(group.getServerCreateTime());
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public Byte getStatusFlag() {
        return statusFlag;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public void setStatusFlag(Byte statusFlag) {
        this.statusFlag = statusFlag;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public String getServerCreateTime() {
        return serverCreateTime;
    }

    public void setServerCreateTime(String serverCreateTime) {
        this.serverCreateTime = serverCreateTime;
    }
}
